﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Caifu.Datas;

namespace Caifu.Services
{
	/// <summary>
	/// 每日净值业务服务
	/// </summary>
	public class NetValueDailyService : IWebNetValueDailyService
	{
		/// <summary>
		/// 
		/// </summary>
		/// <returns></returns>
		public List<NetValueDaily> GetAllNetValueDailys()
		{
			var list = (List<NetValueDaily>)NetValueDailyData.Instance.GetNetValueDailys(1, Int32.MaxValue);
			List<NetValueDaily> list1 = new List<NetValueDaily>();
			List<NetValueDaily> list2 = new List<NetValueDaily>();

			foreach (var item in list)
			{
				if (item.UnitNetValue != 0)
				{
					list1.Add(item);
				}
				else
				{
					list2.Add(item);
				}
			}

			list.Clear();
			list.AddRange(list1);
			list.AddRange(list2);
			return list;
		}


		public IList<Xyz> List()
		{
			return new List<Xyz>() { new Xyz(), new Xyz() };
		}


		public Xyz Get()
		{
			return new Xyz();
		}
	}
}
